<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="enrol/payanyway/db" VERSION="20111209" COMMENT="XMLDB database schema for the PayAnyWay payment gateway Moodle enrolment plugin"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
  <TABLES>
    <TABLE NAME="enrol_payanyway_transactions" COMMENT="PayAnyWay enrolment plugin transactions log">
      <FIELDS>
        <FIELD NAME="id"           TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" SEQUENCE="true" ENUM="false" NEXT="courseid"/>
        <FIELD NAME="courseid"     TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/>
        <FIELD NAME="userid"       TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="courseid" NEXT="instanceid"/>
        <FIELD NAME="instanceid"   TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="cost"/>
        <FIELD NAME="cost"         TYPE="char" LENGTH="13" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="instanceid" NEXT="currency"/>
        <FIELD NAME="currency"     TYPE="char" LENGTH="4" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="cost" NEXT="date_created"/>
        <FIELD NAME="date_created" TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="currency" NEXT="success"/>
        <FIELD NAME="success"    TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="date_created"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" />
      </KEYS>
    </TABLE>
  </TABLES>
</XMLDB>

